{% extends "page_template.html" %}
{% block title %}My Page{% endblock %}
{% block head %}
<link rel="stylesheet" href="../static/various_goods.css">
{{super()}}
{% endblock %}

{% block contents %}
  <section class=profile>
    <h2>UserName</h2>
    <h2>{{user_information.username}}</h2>
    <h2>学部</h2>
    <h2>{{user_information.faculty}}</h2>
    <h2>学科</h2>
    <h2>{{user_information.major}}</h2>
    <h2>学年</h2>
    <h2>{{user_information.grade}}</h2>
    <h2>自己紹介</h2>
    <h2>{{user_information.self_introduction}}</h2>
  </section>

  <section class=posted_goods>
    <div class=various_goods>
      <h2>出品している商品一覧</h2>
      {% for good in posted_goods %}
        <div class=one_good>
          <tr>
            <td>出品者: </td><br>
            <td>{{good.username}}</td><br>
            <td>商品名: </td><br>
            <td>{{good.goods_name}}</td><br>
            <td>レンタル料: </td><br>
            <td>{{good.rental_fee}}</td><br>
            <td><a href="/goods_detail/{{good.goods_id}}"><img src={{good.filepath1}}/ width=200px height=200px ></a></td>
            <br>
          </tr>
        </div>
      {% endfor %}
    </div>
  </section>

  <section class=rental_goods>
    <div class=various_goods>
      <h2>レンタルしている商品一覧</h2>
      {% for good in rental_goods %}
        <div class=one_good>
          <tr>
            <td>出品者: </td><br>
            <td>{{good.username}}</td><br>
            <td>商品名: </td><br>
            <td>{{good.goods_name}}</td><br>
            <td>レンタル料: </td><br>
            <td>{{good.rental_fee}}</td><br>
            <td><a href="/goods_detail/{{good.goods_id}}"><img src={{good.filepath1}}/ width=200px height=200px ></a></td>
            <br>
          </tr>
        </div>
      {% endfor %}
    </div>
  </section>

  <section class=lend_goods>
    <div class=various_goods>
      <h2>貸している商品一覧</h2>
      {% for good in lend_goods %}
      <div class=one_good>
        <tr>
          <td>出品者: </td><br>
          <td>{{good.username}}</td><br>
          <td>商品名: </td><br>
          <td>{{good.goods_name}}</td><br>
          <td>レンタル料: </td><br>
          <td>{{good.rental_fee}}</td><br>
          <td><a href="/goods_detail/{{good.goods_id}}"><img src={{good.filepath1}}/ width=200px height=200px ></a></td>
          <br>
        </tr>
      </div>
      {% endfor %}
    </div>
  </section>
{% endblock %}

{% block footer %}
  <p><a href="/top_page">TOPへ</a></p>
{% endblock %}
